
var sweetTitles = {
	x : 10,								// @Number: x pixel value of current cursor position
	y : 20,								// @Number: y pixel value of current cursor position
	tipElements : "a",	    			// @Array: Allowable elements that can have the toolTip,split with ","
	init : function() {
		$(this.tipElements).mouseover(function(e){	
										
			this.myTitle = this.title;
			this.myRel =this.rel;			
			this.title ="";
			this.Cssclass="";			 	
			if(this.myRel=="friend")
			this.Cssclass="class='"+this.myRel+"'";
			else
			this.Cssclass="class='tooltip'";
			
			var tooltip = "<div id='tooltip' "+ this.Cssclass +"><p>"+this.myTitle+"</p></div>";		   
			if(this.myTitle!=""&&this.myTitle!="undefined"&&this.myTitle!=null)
			{
				$('body').append(tooltip);
				$('#tooltip')
					.css({
						"opacity":"1",
						"top":(e.pageY+20)+"px",
						"left":(e.pageX+10)+"px"
					}).show('fast');	
			}
				
		}).mouseout(function(){
			this.title = this.myTitle;
			$('#tooltip').remove();
		}).mousemove(function(e){
			$('#tooltip')
			.css({
				"top":(e.pageY+20)+"px",
				"left":(e.pageX+10)+"px"
			});
		});
	}
};


$(document).ready(function(){
sweetTitles.init();

})